'''
Patches -> Estrutura para a definição de patches diversos.

@author: hanniel
'''

class Inlet:
    
    """ Entrada de partículas no sistema"""

    def __init__(self,topology,exist_time,rate_value,rate_basis,direction):
        
        '''
        Parâmetros: exist_time = tempo de existência [início, fim] em u.t.
        '''     
        self.exist_time=exist_time
        
        self.name='INLET'

        topology.topology_construction_matrix.append(self)
             
class Outlet:
    
    """ Saída de partículas no sistema"""

    def __init__(self,topology, exist_time):
        
        self.exist_time=exist_time     
           
        self.name='OUTLET'
 
        topology.topology_construction_matrix.append(self)
    
class Wall:
    
    """Obstáculo, do tipo parede."""

    def __init__(self,topology,slip_conditions, exist_time,moving_velocity,temperature):
        
        self.exist_time=exist_time
        
        self.name='WALL'
        
        self.temperature=temperature
        
        '''slip_conditions = Sem escorregamento ('no_slip') / Com escorregamento ('slip')'''
        
        self.slip_conditions = slip_conditions
        
        self.moving_velocity=moving_velocity

        topology.topology_construction_matrix.append(self)
    
class Blockage:
    
    """Obstáculo genérico."""

    def __init__(self,topology,exist_time, slip_conditions,moving_velocity,temperature):
        
        self.exist_time=exist_time
        
        self.name='BLOCKAGE'
        
        self.temperature=temperature
        
        self.slip_conditions = slip_conditions
        
        self.moving_velocity=moving_velocity

        topology.topology_construction_matrix.append(self)
    
class Particle_Inject:
    
    """Cria um corpo de partículas"""
    
    def __init__(self, topology,fluid,inject_coords, exist_time):
        
        self.exist_time=exist_time
        
        self.name='PARTICLE_INJECT'
        
        self.fluid=fluid
        
        self.inject_x0=inject_coords[0]
        self.inject_x=inject_coords[1]
        self.inject_y0=inject_coords[2]
        self.inject_y=inject_coords[3]
        
        topology.topology_construction_matrix.append(self)
        
